package 多线程.休眠;

public class Test {
    public static void main(String[] args) throws Exception {
        Thread thread = new Thread(new Example(),"多线程");

        thread.start();

        for (int i = 0; i < 10; i++) {
            if (i==5){
                System.out.println("主线程暂停2秒");
                Thread.sleep(2000);
            }

            System.out.println("主线程："+i);
        }

    }
}
